<?php require_once('../Connections/elevate954.php'); ?>
<?php require_once("../webassist/file_manipulation/helperphp.php"); ?>
<?php require_once("../webassist/database_management/wa_appbuilder_php.php"); ?>
<?php require_once( "../webassist/security_assist/helper_php.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Logged in to ADMIN_SETTINGS")){
	WA_Auth_RestrictAccess("../login_admin.php");
}
?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
	'UploadFolder' => "../",
	'FileName' => "[FileName]",
	'DefaultFileName' => "",
	'ResizeType' => "0",
	'ResizeWidth' => "0",
	'ResizeHeight' => "0",
	'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Insert"]) || isset($_POST["Insert_x"])){
	WA_DFP_UploadFiles("WA_UploadResult1", "COMPANY_LOGO", "0", "", "false", $WA_UploadResult1_Params);
}
?>
<?php 
// WA DataAssist Insert
if (isset($_POST["Insert"]) || isset($_POST["Insert_x"])) // Trigger
{
  $WA_connection = $elevate954;
  $WA_table = "ADMIN_SETTINGS";
  $WA_sessionName = "WADA_Insert_ADMIN_SETTINGS";
  $WA_redirectURL = "ADMIN_SETTINGS_update.php?id=[Insert_ID]";
  if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
  $WA_keepQueryString = false;
  $WA_fieldNamesStr = "id|FIRST_NAME|LAST_NAME|COMPANY_NAME|ADDRESS|CITY|STATE|ZIP|PHONE_NUMBER|EMAIL|COMPANY_LOGO|ADMIN_USERNAME|ADMIN_PASSWORD";
  $WA_fieldValuesStr = "".((isset($_POST["id"]))?$_POST["id"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["FIRST_NAME"]))?$_POST["FIRST_NAME"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["LAST_NAME"]))?$_POST["LAST_NAME"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["COMPANY_NAME"]))?$_POST["COMPANY_NAME"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ADDRESS"]))?$_POST["ADDRESS"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["CITY"]))?$_POST["CITY"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["STATE"]))?$_POST["STATE"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ZIP"]))?$_POST["ZIP"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["PHONE_NUMBER"]))?$_POST["PHONE_NUMBER"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["EMAIL"]))?$_POST["EMAIL"]:"")  ."" . $WA_AB_Split . "".($WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"])  ."" . $WA_AB_Split . "".((isset($_POST["ADMIN_USERNAME"]))?$_POST["ADMIN_USERNAME"]:"")  ."" . $WA_AB_Split . "".((isset($_POST["ADMIN_PASSWORD"]))?$_POST["ADMIN_PASSWORD"]:"")  ."";
  $WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''";
  $WA_fieldNames = explode("|", $WA_fieldNamesStr);
  $WA_fieldValues = explode($WA_AB_Split, $WA_fieldValuesStr);
  $WA_columns = explode("|", $WA_columnTypesStr);
  $WA_connectionDB = $database_elevate954;
  mysql_select_db($WA_connectionDB, $WA_connection);
  @session_start();
  $insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
  $WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
  $MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
  $_SESSION[$WA_sessionName] = mysql_insert_id($WA_connection);
  if ($WA_redirectURL != "")  {
    $WA_redirectURL = str_replace("[Insert_ID]",$_SESSION[$WA_sessionName],$WA_redirectURL);
    if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
      $WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
    }
    header("Location: ".$WA_redirectURL);
  }
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script src="../webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>

<link href="../webassist/forms/fd_basic_default.css" rel="stylesheet" type="text/css">
<link href="../webassist/forms/dataassist_button.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="Insert_Basic_Default_ProgressWrapper">
<form enctype="multipart/form-data"  class="Basic_Default" id="Insert_Basic_Default" name="Insert_Basic_Default" method="post" action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">
        <fieldset class="Basic_Default" id="Insert">
          <legend class="groupHeader">Insert</legend>
    <div class="lineGroup"> <label for="id" class="sublabel" > id:</label>
                          <div class="errorGroup">
     <span>
  <input id="id" name="id" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","id"):"")); ?>" class="formTextfield_Medium" tabindex="1">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="FIRST_NAME" class="sublabel" > FIRST_NAME:</label>
                          <div class="errorGroup">
     <span>
  <input id="FIRST_NAME" name="FIRST_NAME" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","FIRST_NAME"):"")); ?>" class="formTextfield_Medium" tabindex="2">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="LAST_NAME" class="sublabel" > LAST_NAME:</label>
                          <div class="errorGroup">
     <span>
  <input id="LAST_NAME" name="LAST_NAME" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","LAST_NAME"):"")); ?>" class="formTextfield_Medium" tabindex="3">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="COMPANY_NAME" class="sublabel" > COMPANY_NAME:</label>
                          <div class="errorGroup">
     <span>
  <input id="COMPANY_NAME" name="COMPANY_NAME" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","COMPANY_NAME"):"")); ?>" class="formTextfield_Medium" tabindex="4">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ADDRESS" class="sublabel" > ADDRESS:</label>
                          <div class="errorGroup">
     <span>
  <input id="ADDRESS" name="ADDRESS" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","ADDRESS"):"")); ?>" class="formTextfield_Medium" tabindex="5">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="CITY" class="sublabel" > CITY:</label>
                          <div class="errorGroup">
     <span>
  <input id="CITY" name="CITY" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","CITY"):"")); ?>" class="formTextfield_Medium" tabindex="6">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="STATE" class="sublabel" > STATE:</label>
                          <div class="errorGroup">
     <span>
  <input id="STATE" name="STATE" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","STATE"):"")); ?>" class="formTextfield_Medium" tabindex="7">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ZIP" class="sublabel" > ZIP:</label>
                          <div class="errorGroup">
     <span>
  <input id="ZIP" name="ZIP" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","ZIP"):"")); ?>" class="formTextfield_Medium" tabindex="8">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="PHONE_NUMBER" class="sublabel" > PHONE_NUMBER:</label>
                          <div class="errorGroup">
     <span>
  <input id="PHONE_NUMBER" name="PHONE_NUMBER" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","PHONE_NUMBER"):"")); ?>" class="formTextfield_Medium" tabindex="9">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="EMAIL" class="sublabel" > EMAIL:</label>
                          <div class="errorGroup">
     <span>
  <input id="EMAIL" name="EMAIL" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","EMAIL"):"")); ?>" class="formTextfield_Medium" tabindex="10">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="COMPANY_LOGO" class="sublabel" > COMPANY_LOGO:</label>
                          <div class="errorGroup">
     <span>
  <input name="COMPANY_LOGO" type="file" id="COMPANY_LOGO" size="30" tabindex="11">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ADMIN_USERNAME" class="sublabel" > ADMIN_USERNAME:</label>
                          <div class="errorGroup">
     <span>
  <input id="ADMIN_USERNAME" name="ADMIN_USERNAME" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","ADMIN_USERNAME"):"")); ?>" class="formTextfield_Medium" tabindex="12">
	   </span>
                          </div>
    </div> 
    <div class="lineGroup"> <label for="ADMIN_PASSWORD" class="sublabel" > ADMIN_PASSWORD:</label>
                          <div class="errorGroup">
     <span>
  <input id="ADMIN_PASSWORD" name="ADMIN_PASSWORD" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("ADMINSETTINGSinsert","ADMIN_PASSWORD"):"")); ?>" class="formTextfield_Medium" tabindex="13">
	   </span>
                          </div>
    </div> 
        <span class="buttonFieldGroup" >
          <input type="submit" value="Insert" class="formButton" id="Insert" name="Insert" />
        </span>
        </fieldset>
</form></div><div id="Insert_Basic_Default_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('Insert_Basic_Default', 'Insert_Basic_Default_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:Slate']);
</script>
<div id="Insert_Basic_Default_ProgressMessage" >
	<p style="margin:10px; padding:5px;" ><img src="../webassist/progress_bar/images/slate-largespin.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>
</div>
</div>

</body>
</html>
